function getColor()
{
    // Set the browser window's location to the incoming URL
    window._content.document.location = "http://www.google.com/";

    // Make sure that we get the focus
    window.content.focus();
}

function openAboutBox()
{
    window.open('chrome://firedrop/content/about.xul','','chrome,centerscreen');
}

function getFormatting()
{
    openAboutBox();
}

function GetNodeRelativeCoordinates(node, clientX, clientY) {
	var x;
	var y;

	if ("boxObject" in node) { 
		// xul elements
		x = node.boxObject.x;		
		y = node.boxObject.y;
	} else {
	 	// html elements

		// get the coordinates
		x = 0;
		y = 0;
		var currNode = node;
		while (currNode.offsetParent) {
			x += currNode.offsetLeft;
			y += currNode.offsetTop;
			currNode = currNode.offsetParent;
		}

		var doc = node.ownerDocument;
		if (doc) {
			// subtract the scroll position
			if (doc.documentElement && doc.documentElement.scrollTop) {
				y -= doc.documentElement.scrollTop;
				x -= doc.documentElement.scrollLeft;
			} else if (doc.body && doc.body.scrollTop) {
				y -= doc.body.scrollTop;
				x -= doc.body.scrollLeft;
			}
		}
    	}


	var offsetX = (clientX - x);
	var offsetY = (clientY - y);

	return "X: " + offsetX + ", Y: " + offsetY;
}

function copyColor()
{
	alert('sup~');
}